import cn.spring.entity.Greeting;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ShangJi1 {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        Greeting zg = (Greeting) context.getBean("zhangGa");
        Greeting rod = (Greeting) context.getBean("rod");
        rod.sayGreeting();
        zg.sayGreeting();
    }
}
